<?php
/**
 * Created by PhpStorm.
 * User: tengwei
 * Date: 2018/11/22
 * Time: 9:46 AM
 */

namespace app\controllers;
use common\widgets\Tool;
use yii\web\Controller;
use Yii;


class AreaController extends BaseController
{
    /** @var \common\logics\area\AreaLogic $AreaService*/
    private $AreaService;

    public function init()
    {
        $this->AreaService = Yii::$container->get('AreaService');
        parent::init();
    }

    public function actionGetArea()
    {
        $param = [
            'area_parent_id' => Yii::$app->request->post('area_parent_id','0'),        //传递地区父id
        ];
        $result = $this->AreaService->area($param);
        return  $result;
    }

}